/**
 * Creater with IntelliJ IDEA.
 * Description:
 * User: 86152
 * Dae: 2022-07-23
 * Time: 22:10
 */
class MyRunnable2 implements Runnable {
    @Override
    public void run() {
        System.out.println("线程正在执行");
        try {
            Thread.sleep(2000);
        } catch (InterruptedException e) {
            e.printStackTrace();
        }
    }
}
public class demo5 {
    public static void main(String[] args) throws InterruptedException {
        MyRunnable2 tar = new MyRunnable2();
        Thread t = new Thread(tar);
        t.start();
        t.join();
        System.out.println("hello");
    }
}
